package com.jlz.actions.user;

import org.apache.struts2.convention.annotation.Standard;
import org.springframework.beans.factory.annotation.Autowired;

import com.julewa.Client;
import com.julewa.User;

@Standard
public class LogoutAction {
	

	private @Autowired Client client;
	
	public String execute(){
		User user = client.getUser();
		client.setUser(null);
		if(user != null && user.getType() < 0){
			return "global_loginas_admin";
		}else{
			return "global_home";
		}
	}
	
}
